
package model;

import java.io.Serializable;
import java.sql.Date;
import java.text.SimpleDateFormat;

//-- Hnin phyho--
public class DetailDTO  implements Serializable  {
	
	
	private String userId;	
	private String userName;
	private String role;
	private String status;
	private String type;
	private String applyDate;
	private String from;
	private String to;
	private String reason;
	private String leavenature;
	private String workDissemination;
	private String Contact;
	
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getRole() {
		return role;
	}
	public void setRole(String role) {
		this.role = role;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getApplyDate() {
		return applyDate;
	}
	public void setApplyDate(Date applyDate) {
		this.applyDate = convertString(applyDate);
	}
	public String getFrom() {
		return from;
	}
	public void setFrom(Date from) {
		this.from = convertString(from);
	}
	public String getTo() {
		return to;
	}
	public void setTo(Date to) {
		this.to = convertString(to);
	}
	public String getReason() {
		return reason;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	public String getLeavenature() {
		return leavenature;
	}
	public void setLeavenature(String leavenature) {
		this.leavenature = leavenature;
	}
	public String getWorkDissemination() {
		return workDissemination;
	}
	public void setWorkDissemination(String workDissemination) {
		this.workDissemination = workDissemination;
	}
	public String getContact() {
		return Contact;
	}
	public void setContact(String contact) {
		this.Contact = contact;
	}
	public String convertString(Date d) 
	{		
        Date dateNow = d;      
        SimpleDateFormat dateformatMMDDYYYY = new SimpleDateFormat("dd-MM-yyyy");
       
        StringBuilder nowMMDDYYYY = new StringBuilder( dateformatMMDDYYYY.format( dateNow ) );
 
        return nowMMDDYYYY.toString();
 
    }
	
}
